<extend name="Public:base" />

<block name="content">
	<div class="page-header">
	<a href="{:U('Blog/add')}" class="btn btn-primary">新增</a>

	</div>	
	
<div class="row">
	<div class="col-xs-12">	
		<div class="table-responsive">
			<table class="table table-striped table-bordered table-hover">
				<thead>
					<tr>											
						<th>ID</th>
						<th>图片</th> 
						<th>名称</th> 
						<th>发布</th>			
						<th>可评论</th>			
						<th>创建时间</th>	
						<th>操作</th>				
					</tr>
				</thead>
				<tbody>
						<volist name="list" id="data" empty="$empty">
						<tr>						
							<td>{$data.blog_id}</td>
							<td><img src="__ROOT__/{$data.image}" /></td>
							<td>{$data.title}</td>
							
							<td>
								<switch name="data.status">    
									<case value="1">
										<span class="green bold">是</span>
									</case>    
									<case value="0">
										<span class="red bold">否</span>
									</case>
								</switch>
									
							</td>
							<td>
								<switch name="data.allow_reply">    
									<case value="1">
										<span class="green bold">是</span>
									</case>    
									<case value="0">
										<span class="red bold">否</span>
									</case>
								</switch>
									
							</td>
							<td>{$data.create_time}</td>
							<td>
								<a  class="btn btn-xs btn-info" href='{:U("Blog/edit",array("id"=>$data["blog_id"]))}'>
									<i class="icon-edit bigger-120"></i>
								</a> 
								<a class="delete btn btn-xs btn-danger" href='{:U("Blog/del",array("id"=>$data["blog_id"]))}' >
									<i class="icon-trash bigger-120"></i>
								</a>
							</td>
						</tr>
						</volist>	
						
						<tr>
							<td colspan="20" class="page">{$page}</td>
						</tr>
				</tbody>
				
			</table>
		</div>
	</div>
</div>
</block>